Learn R Programming

zarr (version 0.2.0)

[[.zarr_group: Get a group or array from a Zarr group

Description

This method can be used to retrieve a group or array from the Zarr group by a relative path to the desired group or array.

Usage

# S3 method for zarr_group
[[(x, i)

Value

An instance of zarr_group or zarr_array, or NULL if the path is not found.

Arguments

x

A zarr_group object to extract a group or array from.

i

The path to a group or array in x. The path is relative to the group, it must not start with a slash "/". The path may start with any number of double dots ".." separated by slashes "/" to denote groups higher up in the hierarchy.

Examples

Run this code
z <- create_zarr()
z$add_group("/", "tst")
z$add_group("/tst", "subtst")
tst <- z[["/tst"]]
tst[["subtst"]]

Run the code above in your browser using DataLab